﻿@{
    Layout = "~/Views/Shared/Main.cshtml";
}
<div class="box">
    <div class="title">
        <h3>
            重置密码</h3>
    </div>
    <div class="box-content">
        <form id="form1" action="/account/setnewpassword" method="post" class="form-horizontal">
        <input type="hidden" name="token" />
        <input type="hidden" name="u" value="@ViewBag.U" />
        <div class="control-group">
            <div class="controls">
                <span class="text-info">在这里输入新密码</span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                新密码
            </label>
            <div class="controls">
                <input type="password" id="txtpassword" name="password" class="span4 {required:true,minlength:6,maxlength:18}" 
                    placeholder="请输入新密码" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                重复密码
            </label>
            <div class="controls">
                <input type="password" id="txtconfirm" name="confirm" class="span4 {required:true,equalTo:'#txtpassword'}" 
                    placeholder="请再次输入新密码" />
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <input type="submit" value="重置密码" class="btn btn-info" 
                    style="width: 20%"/>
            </div>
        </div>
        </form>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#form1').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
    </script>
}